import React from "react";
import { Form, Col, Row, Button } from "antd";


import "./index.css";

function FormOrder(props){
    const [form] = Form.useForm();
    const{onFinish,initialValues,name,getFields,resetFields}=props;
    return(
        <>
        <Form
form={form}
name={name}
className="ant-advanced-search-form"
onFinish={onFinish}
initialValues={initialValues}
>
<Row gutter={24}>{getFields}
<Col span={11} style={{ textAlign: "right" }}>
    <Button
      type="primary"
      htmlType="submit"
      style={{
        paddingLeft: 50,
        paddingRight: 50,
        background: "rgb(247, 211, 9)",
      }}
    >
      确认
    </Button>

    <Button
      style={{ margin: "0 8px", paddingLeft: 50, paddingRight: 50 }}
      onClick={() => {
        resetFields()
      }}
    >
      取消
    </Button>
  </Col>
</Row>

</Form>
        </>
    )
}

export default FormOrder;